import request from "@/utils/request";

// 查询电子围栏列表
export function listFence(query) {
  return request({
    url: "/manage/fence/list",
    method: "get",
    params: query,
  });
}

// 查询电子围栏详细
export function getFence(id) {
  return request({
    url: "/manage/fence/" + id,
    method: "get",
  });
}

// 新增电子围栏
export function addFence(data) {
  return request({
    url: "/manage/fence",
    method: "post",
    data: data,
  });
}

// 修改电子围栏
export function updateFence(data) {
  return request({
    url: "/manage/fence",
    method: "put",
    data: data,
  });
}

// 删除电子围栏
export function delFence(id) {
  return request({
    url: "/manage/fence/" + id,
    method: "delete",
  });
}

export function saveFenceData(data) {
  return request({
    url: "/manage/fence/saveFenceData",
    method: "post",
    data: data,
  });
}
